using System;
using Microsoft.Practices.Unity.InterceptionExtension;

namespace EnterpriseLibraryExtensions.PolicyInjection.UnityBridge.InterceptionStrategies
{
    /// <summary>
    /// The InterceptorFactory returns the most optimal interceptor for the provided type.
    /// </summary>
    internal interface IInterceptorFactory
    {
        /// <summary>
        /// Gets the most optimal interceptor for the type provided.
        /// </summary>
        /// <param name="type">The type for which to determine the interceptor..</param>
        /// <returns>The interceptor instance.</returns>
        IInstanceInterceptor GetInstanceInterceptor(Type type);

        /// <summary>
        /// Gets the type interceptor.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns>The interceptor instance or null if no suitable interceptor was found for type.</returns>
        ITypeInterceptor GetTypeInterceptor(Type type);
    }
}